package com.sakura.seckill.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 公共返回对象枚举
 * @author Sakura
 * @Date 2022-07-26 21:42
 */
@Getter
@ToString
@AllArgsConstructor
public enum RespBeanEnum {

    //通用
    SUCCESS(200,"SUCCESS"),
    ERROR(500,"服务器异常"),
    //登录
    LOGIN_ERROR(500210,"用户名或密码错误"),
    MOBILE_ERROR(500211,"手机号错误"),
    BIND_ERROR(500212,"绑定异常"),
    MOBILE_NOT_EXIST(500213,"手机号不存在"),
    PASSWORD_UPDATE_FAIL(500214,"密码更新失败"),
    SESSION_ERROR(500215,"用户信息错误"),
    //秒杀模块
    EMPTY_STOCK(500301,"库存不足"),
    REPEATE_ERROR(500302,"重复秒杀"),
    REQUEST_ILLEGAL(500303,"请求非法，请重新尝试"),
    ERROR_CAPTCHA(500304,"验证码错误，请重新输入"),
    ACCESS_LIMIT_REAHCED(500305,"请求次数过多，请稍后再试"),
    ;
    private final Integer code;
    private final String message;
}
